<template>
   <div>
    <!-- 这是Home -->
    <TypeNav></TypeNav>
    <ListContainer></ListContainer>
    <Recommend></Recommend>
    <Rank></Rank>
    <Like></Like>
    <Floor v-for="(floor,index) in getFloorList" :key="floor.id" :list="floor"></Floor>
    <Brand></Brand>
   </div>
</template>
<script>
import ListContainer from '@/pages/Home/ListContainer'
import Brand from '@/pages/Home/Brand'
import Floor from '@/pages/Home/Floor'
import Like from '@/pages/Home/Like'
import Rank from '@/pages/Home/Rank'
import Recommend from '@/pages/Home/Recommend'
import {mapState} from 'vuex'
export default {
   name:'Home',
   data() {
      return {
      }
   },
   components:{
      ListContainer,
      Brand,
      Floor,
      Like,
      Rank,
      Recommend
   },
   created(){
   },
   computed:{
      ...mapState({
          getFloorList:state=>state.Home.getFloorList
      })
   },
   methods:{
   },
   mounted(){
      this.$store.dispatch('getFloorList')
      //  获取用户信息在首页展示getUserInfo
      this.$store.dispatch('getUserInfo')
   }
}
</script>
<style>

</style>
